package com.contract.spirit.bean.entity

import android.text.TextUtils

/**
 * @author: witness
 * created: 2021/9/28
 * desc:
 */
data class GuarantOrderInfo(
    val symbol:String,
    val entryPrice:String, //开仓均价
    val liquidationPrice:String, //强平价格
    val positionAmt:String, //持仓数量
    val unRealizedProfit:String, //未实现盈亏
    val positionSide:String, //持仓方向
    val updateDate:String,
    val exchangeType:String
){
    fun isSell():Boolean{
        return !TextUtils.isEmpty(positionSide) && positionSide.contains("卖")
    }
    fun isNegative(): Boolean {
        return !TextUtils.isEmpty(unRealizedProfit) && unRealizedProfit.contains("-")
    }
}
